package com.knight.study.patterns.tujie.memento;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author knight
 * @Date 2024/9/12 14:51
 */

public class Memento {
    int money;
    ArrayList fruits;
    public int getMoney(){
        return this.money;
    }

    Memento(int money) {
        this.money = money;
        this.fruits = new ArrayList();
    }
    void addFruit(String fruit) {
        fruits.add(fruit);
    }
    List getFruits() {
        return (List) fruits.clone();
    }
}
